#%RAML 1.0
title: Inventory Storage Item Batch Sync API
version: v0.5
protocols: [ HTTP, HTTPS ]
baseUri: http://localhost

documentation:
  - title: "Inventory Storage Item Batch Sync API"
    content: <b>Batch API for synchronously uploading items into the inventory</b>

types:
  errors: !include raml-util/schemas/errors.schema
  items_post: !include items_post.json
/item-storage/batch/synchronous:
  displayName: Item Batch Upload Sync API
  post:
    description: "Create or update a collection of items in a single synchronous request"
    queryParameters:
      upsert:
        description: When a record with the same id already exists upsert=true will update it, upsert=false will fail the complete batch.
        type: boolean
        required: false
        default: false
    body:
      application/json:
        type: items_post
        example: !include examples/items_post.json
    responses:
      201:
        description: "All items have been successfully created or updated"
      413:
        description: "Payload Too Large"
        body:
          text/plain:
            example: "Payload Too Large"
      422:
        description: "Unprocessable Entity"
        body:
          application/json:
            type: errors
      500:
        description: "Internal server error"
        body:
          text/plain:
            example: "Internal server error"

